package com.dao.impl;

import com.dao.MenuDao;
import com.dao.UserDao;
import com.pojo.Menu;
import org.mybatis.spring.SqlSessionTemplate;

import java.util.Collections;
import java.util.List;

public class MenuDaoImpl implements MenuDao {
    private SqlSessionTemplate sqlSession;

    public void setSqlSession(SqlSessionTemplate sqlSession) {
        this.sqlSession = sqlSession;
    }


    @Override
    public void makeMenu() {
        sqlSession.getMapper(MenuDao.class).makeMenu();
        System.out.println("做菜");
    }

    @Override
    public List<Menu> selectMenu() {
        return sqlSession.getMapper(MenuDao.class).selectMenu();
    }


}
